package com.example.hls_homework2;

import android.content.Intent;
import android.os.Bundle;
import android.widget.Button;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        // 初始化按钮并设置点击事件
        Button btnUC1 = findViewById(R.id.btn_uc1);
        Button btnUC2 = findViewById(R.id.btn_uc2);
        Button btnUC3 = findViewById(R.id.btn_uc3);
        Button btnUC4 = findViewById(R.id.btn_uc4);
        Button btnUC5 = findViewById(R.id.btn_uc5);

        btnUC1.setOnClickListener(v -> startActivity(new Intent(MainActivity.this, UC1Activity.class)));
        btnUC2.setOnClickListener(v -> startActivity(new Intent(MainActivity.this, UC2Activity.class)));
        btnUC3.setOnClickListener(v -> startActivity(new Intent(MainActivity.this, UC3Activity.class)));
        btnUC4.setOnClickListener(v -> startActivity(new Intent(MainActivity.this, UC4Activity.class)));
        btnUC5.setOnClickListener(v -> startActivity(new Intent(MainActivity.this, UC5Activity.class)));
    }
}